# import tensorflow as tf
# from tensorflow.python.client import device_lib
import numpy as np

import my_tool
import numpy
import torch

a=np.random.rand(2,2,4)

# import matplotlib.pyplot as plt
#
# train_acc_list = []
# train_mIOU_list = []
# val_acc_list = []
# val_mIOU_list = []
#
#
#
# train_acc_list = [0.1, 0.2, 0.3, 0.4, 0.6, 0.65]
# train_mIOU_list = [20, 30, 35, 40, 41, 46]
# x = range(len(train_acc_list))
#
# ln1 = plt.plot(x, train_acc_list, color='red',marker='o')
# ln2 = plt.plot(x, train_mIOU_list, color='blue',marker='*')
# # my_font = fm.FontProperties(fname="/usr/share/fonts/wqy-microhei/wqy-microhei.ttc")
#
# # plt.title("电子产品销售量", fontproperties=my_font)  # 设置标题及字体
#
# plt.legend()
# plt.show()
# plt.legend(handles=[ln1, ln2], labels=['acc', 'miou'])
#


# print("Let's use %d GPUs!" % (torch.cuda.device_count()),end='')
# print("Let's use %d GPUs!" % (torch.cuda.device_count()),end='')
# print("Let's use %d GPUs!" % (torch.cuda.device_count()),end='')
#


# from tool import ConfigSensatUrban as config
#
# inlist = []
# outlist = []
# d_in = 8
# inlist += [d_in]
# for i in range(config.num_layers):
#     d_out = config.d_out[i]
#     outlist += [d_out]
#     d_in = 2 * d_out
#     inlist += [d_in]
#
# d_out = d_in
# outlist += [d_out]
#
# for j in range(config.num_layers):
#     if j < 3:
#         d_in = d_out + 2 * config.d_out[-j - 2]
#         inlist += [d_in]
#         d_out = 2 * config.d_out[-j - 2]
#         outlist += [d_out]
#     else:
#         d_in = 4 * config.d_out[0]
#         inlist += [d_in]
#         d_out = 2 * config.d_out[0]
#         outlist += [d_out]
#
# print(inlist)
# print(outlist)

#
# a=[[0,1],[2,0]]
#
# b=[[3,4],[5,6]]
#
# c=np.concatenate((a,b),axis=-1)
# print(c)


#
# path= r'/home-ustc/lzp21/dataset/SensatUrban' # p
#
# train_files, val_files, test_files = my_tool.get_file_lists(path, True)


#
# print(device_lib.list_local_devices())
# print(tf.test.is_gpu_available())
#
# with tf.device('/cpu:0'):
#     a = tf.constant([1.0, 2.0, 3.0], shape=[3], name='a')
#     b = tf.constant([1.0, 2.0, 3.0], shape=[3], name='b')
# with tf.device('/gpu:0'):
#     c = a + b
# sess = tf.Session()
# print(c)
# print(sess.run(c))
